﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nuzzle.Protocol.Messages.Game.Character.Choice
{
    public class CharactersListMessage : NetworkMessage
    {
        public CharactersListMessage(bool hasStartupAction, List<Types.Game.Character.Choice.CharacterBaseInformations> characters)
            : base(NetworkMessageID.CharactersListMessage)
        {
            base.WriterBuffer.writeBoolean(hasStartupAction);
            base.WriterBuffer.writeShort((short)characters.Count);
            foreach (var c in characters)
            {
                base.WriterBuffer.writeShort(45);
                c.Serialize(this);
            }
        }
    }
}
